Make your own free website on Tripod.com



/*  

foreach was added in DMD 0.71
http://www.digitalmars.com/d/statement.html#foreach


Aggregates can be string literals, which can be accessed as 
char, wchar, or dchar arrays.

*/





void test()
    {
        foreach (char c; "ab")
        {
        printf("'%c'\n", c);
        }
        foreach (wchar w; "xy")
        {
        wprintf("'%c'\n", w);
        }
    }



int main()
{


    test();
    return 0;

}